﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ReadFile
	{
	class Program
		{
		static void Main(string[] args)
			{
			string input = "";
			FileStream fstream = new FileStream("test.txt", FileMode.Open, FileAccess.Read);
			StreamReader testFile = new StreamReader(fstream);
			input = testFile.ReadLine();
			//this while will write the first line of the text and assign the second line to a string and keep reading untill the end
			while (input != null)
				{
				Console.WriteLine("{0}", input);
				input = testFile.ReadLine();
				}
			}
		}
	}
